# coding = UTF-8

import os
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import n4j.call_liantong as nclt
import math
import time

if __name__ == '__main__':
    csv_list = []

    os.chdir('D:\\tuoputu\\01.28\\LOSS')
    now_dir = os.getcwd()
    for root, dirs, files in os.walk(now_dir):
        for file in files:
            if os.path.splitext(file)[1] == '.csv':
                csv_list.append(file)

    weizhi = []
    min_values = []
    min_dic = {}
    # for csv_name in csv_list:
    #     csv_name = open(csv_name, encoding='utf-8', errors='ignore')
    #     csv = pd.read_csv(csv_name)
    csv_name = open(csv_list[30], encoding='utf-8', errors='ignore')
    csv = pd.read_csv(csv_name)
    print(csv.min())
    csv.min().plot(kind='line', marker='o')
    plt.show()

